package DataStructure.linear;

import DataStructure.linear.SequenceList;

public class SequenceListTest {
    public static void main(String[] args) {
        //创建顺序表对象
        //SequenceList<String> s1 = new  SequenceList<String>(10);
        SequenceList<String> s1 = new SequenceList<>(10);
        //测试插入
        s1.insert("柳淇");
        s1.insert("琪琪");
        s1.insert("老白");
        s1.insert(1,"我爱你");

        for (String s : s1) {
            System.out.println(s);
        }

        System.out.println("----------------------------------");

        //测试获取
        String result = s1.get(1);
        System.out.println(result);
        //测试删除
        String removeresult = s1.remove(2);
        System.out.println(removeresult);
        //测试清空
        s1.clear();
        System.out.println(s1.length());

    }
}
